<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>完善资料</title>
    <link rel="stylesheet" type="text/css" href="/static/js/backstage/layui/css/layui.css" />
</head>
<body style="max-width:750px;margin:0 auto;">
<div class="wrap-container">
    <h1 style="text-align:center;margin:20px;">完善资料:${member.m_realname}</h1>
    <form class="layui-form" style="width: 90%;padding-top: 20px;">
        <input type="hidden" value="${member.m_id}" name="member[m_id]">
        <div class="layui-form-item">
            <label class="layui-form-label">学号：</label>
            <div class="layui-input-block">
                <input type="text" name="member[m_studentNumber]" required lay-verify="required|xuehao" placeholder="请输入学号" value="${member.m_studentNumber}" autocomplete="off" class="layui-input">
            </div>

        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">寝室号：</label>
            <div class="layui-input-block">
                <input type="text" name="member[m_dormitory]" lay-verify="" placeholder="请输入寝室号(221#210)" value="${member.m_dormitory}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">组别：</label>
            <div class="layui-input-block">
                <select name="member[m_group]" lay-verify="required">
                    <option value="">请选择组别</option>
                    #for(Group group : groups)
                    <option value="${group.g_id}" ${group.g_id==mygroup.g_id?"selected":""}>${group.g_gname}</option>
                    #end
                </select>
            </div>

        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">性别：</label>
            <div class="layui-input-block">
                <input type="radio" name="member[m_sex]" value="1" title="男" ${member.m_sex==1?"checked":""}>
                <input type="radio" name="member[m_sex]" value="2" title="女" ${member.m_sex==2?"checked":""}>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">出生日期：</label>
            <div class="layui-input-block">
                <input type="text" name="member[m_birthday]" required lay-verify="required" placeholder="请选择出生日期" value="${member.m_birthday}" autocomplete="off" class="layui-input" id="date-layui">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">加入日期：</label>
            <div class="layui-input-block">
                <input type="text" name="member[m_joindate]" required lay-verify="required" placeholder="进入实验室日期" value="${member.m_joindate}" autocomplete="off" class="layui-input" id="date-layui2">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">QQ号码：</label>
            <div class="layui-input-block">
                <input type="text" name="member[m_qq]" lay-verify="number" placeholder="请输入QQ号码" value="${member.m_qq}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">联系电话：</label>
            <div class="layui-input-block">
                <input type="text" name="member[m_phone]" lay-verify="phone" placeholder="请输入手机号"  value="${member.m_phone}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">特长-1：</label>
            <div class="layui-input-block">
                <input type="text" name="skill[skillName1]" lay-verify="" placeholder="请输入特长-1（选填）" maxlength="255" value="$!{skill.skillName1}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">介绍-1：</label>
            <div class="layui-input-block">
                <input type="text" name="skill[skillContent1]" lay-verify="" placeholder="请输入介绍-1（选填）" maxlength="255" value="$!{skill.skillContent1}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">特长-2：</label>
            <div class="layui-input-block">
                <input type="text" name="skill[skillName2]" lay-verify="" placeholder="请输入特长-2（选填）" maxlength="255" value="$!{skill.skillName2}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">介绍-2：</label>
            <div class="layui-input-block">
                <input type="text" name="skill[skillContent2]" lay-verify="" placeholder="请输入介绍-2（选填）" maxlength="255" value="$!{skill.skillContent2}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">特长-3：</label>
            <div class="layui-input-block">
                <input type="text" name="skill[skillName3]" lay-verify="" placeholder="请输入特长-3（选填）" maxlength="255" value="$!{skill.skillName3}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">介绍-3：</label>
            <div class="layui-input-block">
                <input type="text" name="skill[skillContent3]" lay-verify="" placeholder="请输入介绍-3（选填）" maxlength="255" value="$!{skill.skillContent3}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">特长-4：</label>
            <div class="layui-input-block">
                <input type="text" name="skill[skillName4]" lay-verify="" placeholder="请输入特长-4（选填）" maxlength="255" value="$!{skill.skillName4}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">介绍-4：</label>
            <div class="layui-input-block">
                <input type="text" name="skill[skillContent4]" lay-verify="" placeholder="请输入介绍-4（选填）" maxlength="255" value="$!{skill.skillContent4}" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">${g==1?"毕业去向":"近期打算"}</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" name="member[m_trace]" class="layui-textarea" maxlength="50">$!{member.m_trace}</textarea>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo">保存提交</button>
                <button type="button" class="layui-btn layui-btn-primary" onclick="javascript:window.history.back()">返回</button>
            </div>
        </div>

        <div class="layui-form-item layui-form-text" style="font-size: 10px;"><i class="layui-icon layui-icon-tips" style="color:#FFB800;"></i>
            提示：个人中心页面预留有个性美化接口：个人技能的“介绍-4”未对用户输入内容进行网页标签过滤，也就是说可以添加js等代码对自己的个人主页进行美化。<br>
            <span style="color:#FF5722;">但需要注意的是</span>：1.添加的js代码不可影响到网站的信息安全，<span style="color:#FF5722;weight:500;">违者严惩</span>！！切记；2.尽量不要改变现有的内容的显示；3.由于本系统兼顾电脑和手机页面，所以添加代码后应及时检查各终端是否都显示正常，尽量不要出现在部分终端上浏览异常的现象。
        </div>
    </form>
</div>

<script src="/static/js/backstage/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="/static/js/wanshan/jquery.js"></script>
<script>
			//Demo
			layui.use(['form','laydate'], function() {
				var form = layui.form;
				var laydate = layui.laydate;
				form.render();
				form.verify({//自定义表单验证
                    xuehao:function(value){
                        var re = /^20\d{8}$/;
                        if(!re.test(value))
                            return "学号格式不正确！";
                    }
                });
				 laydate.render({
                    elem: '#date-layui' //指定元素
                  });
                  laydate.render({
                    elem: '#date-layui2' //指定元素
                  });
				//监听提交
				form.on('submit(formDemo)', function(data) {
					$.ajax({
                        url:"/dowanshan",
                        dataType:"json",
                        type:"post",
                        data:$("form").serialize(),
                        success:function(result){
                            alert(result.tips);
                            window.location = "/users/${member.m_id}";
                            return true;
                        },
                        error:function(result){
                            alert("系统繁忙！");
                         }
                    });
                    return false;
				});
			});
		</script>
</body>

</html>